POV-Ray : Newsgroups : povray.newusers : Bobby hat : Bobby hat Server Time
29 Jul 2024 02:25:16 EDT (-0400)
  Bobby hat  
From: Kari Ojala
Date: 11 Nov 2006 11:29:38
Message: <Xns9878BC4562324kariojalaikifi@203.29.75.35>
I'm trying to do the bobby hat -thing and my functions give extraneous 
sharp edges. The following script  has commented out the kind of thing I'm 
looking for (made with a pattern) and the problematic line uncommented.


#include "colors.inc"

global_settings {assumed_gamma 2.4 }
  
plane {
  y, -1.8
  pigment { checker DarkTan DarkOliveGreen }
  }

light_source { <5, 14, -8> color White }

camera {
  location <0, 0, -4>
  look_at 0 angle 46  
  rotate x*7 rotate y*6 }

#declare ndist = function (x,y) {
  sqrt(pow(x,2)+pow(y,2))/sqrt(2)
  }

height_field  {
  function  100, 100 {
  // pattern { waves scale .1 }
  1+cos(2*pi*ndist(x,y))
  }
  pigment { DarkOrchid }
  translate -.5
  scale <2, .5, 2>
  }


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.